package nku.csc364;

/* Raj Akula
 * Index.java
 * 
 * Index class to hold index and ssn
 * 
 */

public class Index implements Comparable{
	
	String ssn;
	int index;
	
	//Constructor
	public Index(int index, String ssn){
		this.index = index;
		this.ssn = ssn;
	}
	
	//Setter and getter methods for the Index class
	public int getIndex(){
		return index;
	}
	
	public String getSsn(){
		return ssn;
	}
	
	public void setIndex(int index){
		this.index = index;
	}
	
	public void setSsn(String ssn){
		this.ssn = ssn;
	}	
	
	public String toString(){
		return ssn;
	}
	
	// Overwriting the compareTo method
	public int compareTo(Object ssn) {
		// I am using compareTo 
		return this.ssn.compareTo((String)ssn);
	}
}